<html>
<head><meta charset="utf-8"><title>__fastfail in libpanic_abort · t-compiler/windows · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242869-t-compiler/windows/index.html">t-compiler/windows</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242869-t-compiler/windows/topic/__fastfail.20in.20libpanic_abort.html">__fastfail in libpanic_abort</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="200284159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242869-t-compiler/windows/topic/__fastfail%20in%20libpanic_abort/near/200284159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/242869-t-compiler/windows/topic/__fastfail.20in.20libpanic_abort.html#200284159">(Jun 09 2020 at 20:16)</a>:</h4>
<p>It seems back in the day abort in Rust was implemented as an <a href="https://github.com/rust-lang/rust/blob/feb3536eba10c2e4585d066629598f03d5ddc7c6/src/libpanic_abort/lib.rs#L47-L50">illegal opcode</a> on Windows because LLVM doesn't have the __fastfail intrinsic. However, in libstd, abort _is_ implemented as <a href="https://github.com/rust-lang/rust/blob/feb3536eba10c2e4585d066629598f03d5ddc7c6/src/libstd/sys/windows/mod.rs#L302-L318">__fastfail through some inline assembly</a>. Shouldn't the implementation in libstd and in libpanic_abort be the same? cc <span class="user-mention" data-user-id="125267">@Peter Rabbit</span> and <span class="user-mention" data-user-id="116015">@Alex Crichton</span>  since they were involved with some of this back in the day.</p>



<a name="200430243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242869-t-compiler/windows/topic/__fastfail%20in%20libpanic_abort/near/200430243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/242869-t-compiler/windows/topic/__fastfail.20in.20libpanic_abort.html#200430243">(Jun 10 2020 at 15:17)</a>:</h4>
<p>I opened an issue for this: <a href="https://github.com/rust-lang/rust/issues/73215">https://github.com/rust-lang/rust/issues/73215</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>